1. Field of the Invention
The present invention relates to a method for compensating black cores of an image sensor, and more particularly, to a method correcting the intensity of a portion of input pixels where the intensity is smaller than a second predetermined threshold.
2. Description of the Prior Art
In recent years, complementary metal-oxide semiconductor (CMOS) image sensors have become popular solid-state image sensors, largely replacing charge-coupled devices (CCD). Because CMOS image sensors are manufactured by conventional semiconductor manufacturing process, the conventional semiconductor manufacturing process has both low cost and low power consumption. Besides, CMOS image sensors have high quantum efficiency and low read-out noise, and thus have been popularly applied in PC and digital cameras.
Black core phenomenon usually happens in CMOS image sensors (but not limited to CMOS image sensors only). In normal photographic situations, black core phenomenon will not occur. Only when facing the sun to take a picture, black cores of CMOS image sensors will occur due to the strong sunlight.
Please refer to FIG. 1. FIG. 1 is a diagram of a photograph 10 showing black core phenomenon. The photograph 10 includes a sun 12, a first object 15 and a second object 17. The first object 15 and the second object 17 are both black objects with the lowest intensity level. The sun 12 has the highest intensity level. In the middle part of the sun 12, a black core 14 occurs. The black core 14 also has the lowest intensity level. In this embodiment, although the black core 14, the first object 15 and the second object 17 have the lowest intensity level, only the intensity level of the black core 14 is wrong. Hence, before compensating black core phenomenon, distinction between the black core 14 and other black objects is required.
Please refer to FIG. 2 that is a diagram showing scanning order. When scanning an image, one scan line is detected at one time because image storages dealing with a two-dimensional image cost too much. As shown in FIG. 2, scanning starts from the upper left corner of the image. A straight line is scanned from the left to the right, and then the next straight line is scanned till the whole image is scanned completely (the lower right corner of the image).
Please refer to FIG. 3. FIG. 3 is a diagram showing an example that has scan lines passing through a sun. There is a black core 36 occurring in the middle part of a sun 34. A transition region 38 occurs between the sun 34 and the black core 36. Assume that of three scan lines passing through the sun 34, only a second scan line 32 passes through the region of the black core 36. A first scan line 31 and a third scan line 33 do not pass through the region of the black core 36. A width of the transition region 38 is usually smaller than a shadow of a usual object.
Please refer to FIG. 4 and FIG. 3. FIG. 4 is a diagram of an intensity curve of the first scan line 31 in FIG. 3. The horizontal axis represents each input pixel, and the vertical axis represents the intensity of that input pixel. As shown in FIG. 3, the first scan line 31 is divided into three portions by the sun 34, the three portions are named as a first portion 31A, a second portion 31B, and a third portion 31C in order. Assume that an intensity of the first portion 31A is IA1 with a magnitude between a high threshold TH and a low threshold TL. An intensity of the second portion 31B is IB1 with a magnitude greater than the high threshold TH. An intensity of the third portion 31C is IA1. Because the sun 34 has the highest intensity level, the intensity IB1 of the second portion 31B is greater than the high threshold TH.
Please refer to FIG. 5 and FIG. 3. FIG. 5 is a diagram of an intensity curve of the second scan line 32 in FIG. 3. The horizontal axis represents each input pixel, and the vertical axis represents the intensity of each input pixel. As shown in FIG. 3, the second scan line 32 is divided into seven portions by the sun 34, the black core 36 and the transition region 38; the seven portions are named as 32A-32G in order. Assume that an intensity of the first portion 32A is IA2 with a magnitude between a high threshold TH and a low threshold TL. An intensity of the second portion 32B is IB2 with a magnitude greater than the high threshold TH. An intensity of the third portion 32C represents a straight line having a negative slope with a magnitude decreasing from IB2 to ID2. An intensity of the fourth portion 32D is ID2 with a magnitude lower than the low threshold TL. An intensity of the fifth portion 32E represents a straight line having a positive slope with a magnitude increasing from ID2 to IB2. An intensity of the sixth portion 32F is IB2, which is the same as the intensity of the second portion 32B. An intensity of the seventh portion 32G is IA2, which is the same as the intensity of the first portion 32A.
Because the sun 34 has the highest intensity level, the intensity IB2 of the second portion 32B and the sixth portion 32F is greater than the high threshold TH. The intensity ID2 of the fourth portion 32D is lower than the low threshold TL due to the black core 36 having the lowest intensity level. Because the transition region 38 lies between the sun 34 and the black core 36, an intensity of the transition region 38 lies between the intensity of the sun 34 and the intensity of the black core 36. Hence, the intensity of the third portion 32C and the fifth portion 32E lies between IB2 and ID2.
Please refer to FIG. 6 that is a diagram of a digital camera 60. The digital camera 60 includes a lens module 62, an image sensor 64, an image signal processor 66, a storage 68, and a display panel 67. The image sensor 64 is coupled to the lens module 62, and the image signal processor 66 is coupled to the image sensor 64. The storage 68 is coupled to the image signal processor 66, and the display panel 67 is coupled to the image signal processor 66. When the reflected light of a target object forms an image in the image sensor 64 through the lens module 62, the image sensor 64 transforms light signals into electronic signals and delivers electronic signals to the image signal processor 66. The display panel 67 is used for previewing images, and the storage 68 is used for storing images after processing. The black core phenomenon described above usually occurs in the image sensor 64, and black cores are compensated for in the image signal processor 66.
Black core phenomenon usually happens in CMOS image sensors (but not limited to CMOS image sensors only). When facing the sun to take a picture, black cores of CMOS image sensors will occur due to the strong sunlight. This is occurred due to the structure of CMOS image sensors. This deteriorates photographs and further causes user's trouble.